import $http from "./requst";

// 微信分享
export const Wechatshare = data =>
  $http({
    url: "/common/Wechatshare",
    method: "post",
    data
  });
// 首页数据
export const userapi = data => $http({ url: "/userapi", method: "post", data });

// 优惠券列表
export const coupon = data =>
  $http({ url: "/userapi/Index/coupon", method: "post", data });
// 优惠券领取
export const receiveCoupon = data =>
  $http({ url: "/userapi/Index/receiveCoupon", method: "post", data });
// 推荐商品
export const goods = data =>
  $http({ url: "/userapi/Index/goods", method: "post", data });
// 商品详情
export const details = data =>
  $http({ url: "/userapi/Goods/details", method: "post", data });
// 商品收藏
export const collect = data =>
  $http({ url: "/userapi/Goods/collect", method: "post", data });

// 商品取消收藏
export const canceCollect = data =>
  $http({ url: "/userapi/Goods/canceCollect", method: "post", data });
// 余额充值套餐
export const balanceRecharge = data =>
  $http({ url: "/userapi/My/balanceRecharge", method: "post", data });
// 余额充值
export const balanceRechargePay = data =>
  $http({ url: "/userapi/My/balanceRechargePay", method: "post", data });
// 余额充值界面展示
export const balanceRechargeShow = data =>
  $http({ url: "/userapi/My/balanceRechargeShow", method: "post", data });

// 加入购物车
export const addCart = data =>
  $http({ url: "/userapi/Goods/cart", method: "post", data });
// 我的
export const my = data => $http({ url: "/userapi/My", method: "post", data });
// 猜你喜欢
export const guessLike = data =>
  $http({ url: "/userapi/Cart/guessLike", method: "post", data });
// 删除购物车
export const delCart = data =>
  $http({ url: "/userapi/Cart/delCart", method: "post", data });
// 购物车展示
export const showCart = data =>
  $http({ url: "/userapi/Cart", method: "post", data });

// 下单展示
export const orderSubShow = data =>
  $http({ url: "/userapi/Goods/save", method: "post", data });
// 下单提交
export const orderSave = data =>
  $http({ url: "/userapi/Goods/orderPay", method: "post", data });
// 订单列表
export const orderList = data =>
  $http({ url: "/userapi/Order", method: "post", data });
// 订单详情
export const orderDetails = data =>
  $http({ url: "/userapi/Order/orderDetails", method: "post", data });
// 会员购买
export const memberPay = data =>
  $http({ url: "/userapi/My/memberPay", method: "post", data });
// 我的优惠券
export const Coupon = data =>
  $http({ url: "/userapi/Coupon", method: "post", data });
// 收藏记录
export const collectList = data =>
  $http({ url: "/userapi/My/collect", method: "post", data });

// 消费记录
export const Rechargerecord = data =>
  $http({ url: "/userapi/My/user_bill", method: "post", data });

// 订单取消
export const orderCancel = data =>
  $http({
    url: "/userapi/Order/orderCancel",
    method: "post",
    data
  });
// 订单支付
export const orderPay = data =>
  $http({
    url: "/userapi/Order/orderPay",
    method: "post",
    data
  });
// 删除订单
export const orderDel = data =>
  $http({
    url: "/userapi/Order/orderDel",
    method: "post",
    data
  });
// 会员充值记录
export const user_member = data =>
  $http({
    url: "/userapi/My/user_member",
    method: "post",
    data
  });
// 会员充值记录
export const canceCollects = data =>
  $http({
    url: "/userapi/My/canceCollect",
    method: "post",
    data
  });

//取消订单消息提示
export const orderCancelMsg = data =>
  $http({
    url: "/userapi/Order/orderCancelMsg",
    method: "post",
    data
  });
//拼团列表
export const Teamwork = data =>
  $http({
    url: "/userapi/Teamwork",
    method: "post",
    data
  });
